feat(cc-widgets): resolve webpack build failure for http/https modules #612
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
COMPLETES #https://jira-eng-sjc12.cisco.com/jira/browse/CAI-7419
This pull request addresses
A build failure in the CI/CD pipeline caused by Webpack 5 no longer including polyfills for Node.js core modules (http, https) by default. The eventsource library (dependency of @webex/cc-digital-channels) requires these modules, causing the cc-widgets package build to fail with "Module not found" errors.
by making the following changes
Added resolve.fallback configuration in packages/contact-center/cc-widgets/webpack.config.js to set http: false and https: false, instructing webpack to ignore these Node.js-specific modules since browsers have native EventSource API support.
Change Type
The following scenarios were tested
< ENUMERATE TESTS PERFORMED, WHETHER MANUAL OR AUTOMATED >
The GAI Coding Policy And Copyright Annotation Best Practices
Checklist before merging
Make sure to have followed the contributing guidelines before submitting.